#ifndef LYRIC_H
#define LYRIC_H

#include <QWidget>
#include <QMap>
#include <QMultiMap>
#include <QTime>

namespace Ui {
    class Lyric;
}

class Lyric : public QWidget
{
    Q_OBJECT

public:
    explicit Lyric(QWidget *parent = 0);
    ~Lyric();
public slots:
    void refresh();
protected:
    void paintEvent ( QPaintEvent * );
private:
    QString musicFileName;
    QString lyricFileName;
    bool prepareSuccess;
    QTime curTime;
    int lineHeight;
    int align;

    QList<QByteArray> lyricLine;
    QMap<QTime, QString> TimeStringMap;

    bool prepare(QString musicFileName);
};

#endif // LYRIC_H
